package mazeAssignment;

/**
 * Used in the DijkstraShortestSolve class.
 * @author Mark Allen Weiss
 */
class Path implements Comparable<Path>
{
	public Vertex dest;
	public double cost;
	
	
	public Path(Vertex d, double c)
	{
		this.dest = d;
		this.cost = c;
	}
	
	
	@Override
	public int compareTo(Path otherPath)
	{
		double otherCost = otherPath.cost;
		
		if(this.cost < otherCost)
			return -1;
		else if(this.cost > otherCost)
			return 1;
		else
			return 0;
	}

}
